{include file="../../../application/admin/view/public/head" /}
<div class="page-container p10">

    <div class="showpic" style="display:none;"><img class="showpic_img" width="120" height="160"></div>
    
    <form class="layui-form layui-form-pane" method="post" action="">
        <input type="hidden" name="id" value="{$info.id|default=0}">
        <blockquote class="layui-elem-quote layui-quote-nm">
            提示信息：请使用下面的头条图床 以便提升图片加载速度 <br> <a href="https://www.gudian.org/tools/tt.html" target="_blank">点击打开头条图床</a>
        </blockquote>

        <div class="layui-form-item">
            <label class="layui-form-label">显示状态：</label>
            <div class="layui-input-block">
                <input name="is_show" type="radio" id="rad-1" value="0" title="隐藏" {if condition="$info['is_show'] neq 1"}checked {/if}>
                <input name="is_show" type="radio" id="rad-2" value="1" title="显示" {if condition="$info['is_show'] eq 1"}checked {/if}>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">排序：</label>
            <div class="layui-input-inline w100">
                <input type="text" class="layui-input" value="{$info.sort|default=99}" placeholder="" id="sort" name="sort">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">*所属类别</label>
            <div class="layui-input-inline w150">
                <select name="type_id" lay-verify="required">
                    <option value="">请选择</option>
                    {foreach $types as $type}
                    <option value="{$type.id}"
                        {if $type.id == $info.type_id} selected {/if}
                    >{$type.name}</option>
                    {/foreach}
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">名称：</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input" lay-verify="required" value="{$info.name}" placeholder="" id="name" name="name">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">内容：</label>
            <div class="layui-input-block">
                <textarea class="layui-textarea" name="content">{$info.content}</textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">分类封面：</label>
            <div class="layui-input-inline w600">
                <input type="text" name="fengmian" placeholder="图片地址或路径" value="{$info['fengmian']}" class="layui-input upload-input">
            </div>
            <div class="layui-input-inline ">
<!--                <button type="button" class="layui-btn layui-upload" lay-data="{data:{thumb:0,thumb_class:'type_pic'}}" id="upload1">上传图片</button>-->
                <a href="https://www.gudian.org/tools/tt.html" target="_blank" class="layui-btn" >头条图床</a>
            </div>
        </div>


        <div class="layui-form-item center">
            <div class="layui-input-block">
                <button type="submit" class="layui-btn" lay-submit="" lay-filter="formSubmit" data-child="true">保 存</button>
                <button class="layui-btn layui-btn-warm" type="reset">还 原</button>
            </div>
        </div>
    </form>

</div>
{include file="../../../application/admin/view/public/foot" /}
<script type="text/javascript">

    layui.use(['form','upload', 'layer'], function () {
        // 操作对象
        var form = layui.form
                , layer = layui.layer
                , upload = layui.upload
                , $ = layui.jquery;

    });
</script>

</body>
</html>